<script>
  var requireJS = [];

  loadJS(requireJS, "js/views/bizcenter.js");
</script>
<div class="animated fadeIn">

  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-header">
          <i class="fa fa-align-justify"></i> 业务中心列表
        </div>
        <div class="card-block">
          <div id="center-list-table-container">
          </div>
          <nav id="center-list-pagination">
          </nav>
        </div>
      </div>
    </div>
    <!--/.col-->
  </div>


    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-header">
                  <i class="fa fa-plus-circle"></i>新增业务中心
                </div>
                <div class="card-block">
                    <form action="" method="post">
                        <div class="form-group" id="ddal-center-name-div">
                            <label for="ddal-center-name">业务中心<b>名称</b></label>
                            <input id="ddal-center-name" data-pdiv="ddal-center-name-div" name="ddal-center-name" class="form-control required" placeholder="">
                            <!--<span class="help-block">Please enter your email</span>-->
                        </div>
                        <div class="form-group" id="ddal-center-code-div">
                            <label for="ddal-center-code">业务中心<b>代码</b></label>
                            <input id="ddal-center-code" data-pdiv="ddal-center-code-div" name="ddal-center-code" class="form-control required" placeholder="">
                            <!--<span class="help-block">Please enter your password</span>-->
                        </div>
                      <div class="form-group" id="ddal-center-desc-div">
                        <label for="ddal-center-desc">业务中心<b>描述</b></label>
                        <input id="ddal-center-desc" data-pdiv="ddal-center-desc-div" name="ddal-center-desc" class="form-control required" placeholder="">
                        <!--<span class="help-block">Please enter your password</span>-->
                      </div>
                    </form>
                </div>
                <div class="card-footer">
                    <button type="submit" class="btn btn-sm btn-primary" id="bizcenter-btn-submit"><i class="fa fa-dot-circle-o"></i> 保存</button>
                    <button type="reset" class="btn btn-sm btn-danger" id="bizcenter-btn-reset"><i class="fa fa-ban"></i> 重置</button>
                </div>
            </div>
        </div>
        <!--/.col-->
    </div>
    <!--/.row-->
</div>

<script id="center-list-table-row" type="text/template">
  <table id="center-list-table" class="table fadeIn">
  <thead>
  <tr>
    <th>中心名称</th>
    <th>中心编码</th>
    <!--<th>状态</th>-->
    <th>注册时间</th>
    <th>操作</th>
  </tr>
  </thead>
  <tbody>
    {@each centerList as center}
    <tr>
      <td>${center.name}</td>
      <td>${center.code}</td>
      <!--
      {@if center.status == 'VALID'}
      <td><span class="badge badge-success">${center.status}</span></td>
      {@else}
      <td><span class="badge badge-default">${center.status}</span></td>
      {@/if}-->
      <td>${center.registerTime}</td>
      <td>
        <button type="button" data-center-id="${center.id}" data-center-code="${center.code}" data-center-name="${center.name}" class="btn btn-sm btn-danger btn-del-center"><i class="fa fa-trash"></i>&nbsp;删除</button>
      </td>
    </tr>
    {@/each}
  </tbody>
  </table>
</script>

<script id="center-list-nav" type="text/template">
  {@if first == false || last == false }
  <ul class="pagination">
    {@if first == false}
    <li class="page-item"><a data-paging-number="${number}" data-paging-type="pre" class="page-link center-list-nav" href="#">上一页</a></li>
    {@/if}
    {@if last == false}
    <li class="page-item"><a data-paging-number="${number}" data-paging-type="next" class="page-link center-list-nav" href="#">下一页</a></li>
    {@/if}
  </ul>
  {@/if}
</script>
